<?php

/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the controller to call when that URI is requested.
|
*/

use App\Http\Middleware\Admin;

Route::get('/', array('uses' => 'PagesController@index', 'as' => 'home'));
Route::get('/product-finder/{name}', 'PagesController@productFinder');
Route::get('/fragrance-club', 'PagesController@fragranceClub');
Route::get('/about', 'PagesController@about');
Route::get('/contact', 'PagesController@contact');
Route::get('/faq', 'PagesController@faq');

Route::group(['prefix' => 'admin', 'middleware' => 'admin'],function() {

	Route::resource('category', 'Admin\CategoryController');
	Route::resource('product', 'Admin\ProductController');
	Route::get('users', array('uses' => 'Admin\ProductController@index', 'as' => 'admin.home'));
});


Route::controllers([
	'auth' => 'Auth\AuthController',
	'password' => 'Auth\PasswordController',
]);
